package main

import (
	"fmt"
	"time"
)

// 并发执行
func printNumbers() {
	for i := 1; i <= 5; i++ {
		fmt.Println(i)
		time.Sleep(100 * time.Millisecond)
	}
}

func printLetters() {
	for _, letter := range "ABCDE" {
		fmt.Println(string(letter))
		time.Sleep(200 * time.Millisecond)
	}
}

func main() {
	// 启动两个 Goroutine
	go printNumbers()
	go printLetters()

	// 等待 Goroutine 完成
	time.Sleep(2 * time.Second)
}
